package com.sdk.es.sdk.entity.common;

public enum EsResultStatus {
    FAIL(1, "失败"),
    SUCCESS(0, "成功"),
    ;

    private final Integer code;
    private final String reason;

    EsResultStatus(Integer code, String reason) {
        this.code = code;
        this.reason = reason;
    }

    public Integer getCode() {
        return code;
    }

    public String getReason() {
        return reason;
    }

    @Override
    public String toString() {
        return "EsResultStatus." + this.name() + "(code=" + this.getCode() + ", reason=" + this.getReason() + ")";
    }
}
